package com.ybl.store.common.constant;

import com.ybl.store.backend.dto.UserInfoDTO;

/**
 * 用户权限常量
 */
public class UserPermission {

    public static final Integer ADMIN = 0;

    public static final Integer MANAGER = 1;

    public static final Integer CLERK = 2;

    public static boolean isPermitted(UserInfoDTO userInfoDTO, Integer permission) {
        return userInfoDTO != null && userInfoDTO.getPermission() <= permission;
    }
}
